
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>熔断Hystrix · tgor note</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="tgor">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-page-toc-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="缓存.html" />
    
    
    <link rel="prev" href="../运维/Nginx负载均衡.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Me
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../category/微服务.html">
            
                <a href="../category/微服务.html">
            
                    
                    微服务
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../Java-Spring/Feign.html">
            
                <a href="../Java-Spring/Feign.html">
            
                    
                    HTTP客户端Feign
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="限流.html">
            
                <a href="限流.html">
            
                    
                    限流
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../运维/Nginx限流.html">
            
                <a href="../运维/Nginx限流.html">
            
                    
                    限流Nginx
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../Java-Spring/负载均衡.html">
            
                <a href="../Java-Spring/负载均衡.html">
            
                    
                    负载均衡
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../运维/Nginx负载均衡.html">
            
                <a href="../运维/Nginx负载均衡.html">
            
                    
                    负载均衡Nginx
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.6" data-path="熔断Hystrix.html">
            
                <a href="熔断Hystrix.html">
            
                    
                    熔断Hystrix
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="缓存.html">
            
                <a href="缓存.html">
            
                    
                    缓存
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="缓存.html">
            
                <a href="缓存.html#本地缓存">
            
                    
                    本地缓存
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.9" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html">
            
                    
                    分布式缓存Redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.10" data-path="分布式事务.html">
            
                <a href="分布式事务.html">
            
                    
                    分布式事务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.11" data-path="分布式事务.html">
            
                <a href="分布式事务.html#事务消息">
            
                    
                    可靠事务消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.12" data-path="../Java-Spring/业务监控.html">
            
                <a href="../Java-Spring/业务监控.html">
            
                    
                    业务监控
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.13" data-path="分布式定时作业.html">
            
                <a href="分布式定时作业.html">
            
                    
                    分布式作业调度ElasticJob
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.14" data-path="../Java-ORM/ORM.html">
            
                <a href="../Java-ORM/ORM.html">
            
                    
                    ORM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.15" data-path="分布式系统及CAP原理.html">
            
                <a href="分布式系统及CAP原理.html">
            
                    
                    分布式系统及CAP原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.16" data-path="../MQ/RabbitMQ笔记.html">
            
                <a href="../MQ/RabbitMQ笔记.html">
            
                    
                    消息驱动Rabbitmq
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../category/数据库.html">
            
                <a href="../category/数据库.html">
            
                    
                    数据库
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../Mysql/经典数据库设计案例.html">
            
                <a href="../Mysql/经典数据库设计案例.html">
            
                    
                    mysql设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../Mysql/Mysql事务与锁.html">
            
                <a href="../Mysql/Mysql事务与锁.html">
            
                    
                    mysql事务与锁
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../Mysql/mysql数据类型.html">
            
                <a href="../Mysql/mysql数据类型.html">
            
                    
                    mysql数据类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../Mysql/mysql索引及查询.html">
            
                <a href="../Mysql/mysql索引及查询.html">
            
                    
                    mysql索引与查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../Mysql/mysql索引及查询.html">
            
                <a href="../Mysql/mysql索引及查询.html#查询语句设计准则">
            
                    
                    mysql查询语句设计准则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="../Mysql/mysql性能测试.html">
            
                <a href="../Mysql/mysql性能测试.html">
            
                    
                    mysql性能测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="../Mysql/mysql主从同步与读写分离.html">
            
                <a href="../Mysql/mysql主从同步与读写分离.html">
            
                    
                    mysql主从同步与读写分离
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="../Java-Spring/SpringBoot事务注解@Transactional.html">
            
                <a href="../Java-Spring/SpringBoot事务注解@Transactional.html">
            
                    
                    Spring事务注解@Transactional
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.9" data-path="../数据结构与算法/位运算应用实例.html">
            
                <a href="../数据结构与算法/位运算应用实例.html">
            
                    
                    位运算应用实例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.10" data-path="../Mongodb-Client/morphia-API汇总.html">
            
                <a href="../Mongodb-Client/morphia-API汇总.html">
            
                    
                    morphia API汇总
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.11" data-path="../Mongodb-Client/mongo驱动连接.html">
            
                <a href="../Mongodb-Client/mongo驱动连接.html">
            
                    
                    mongodb驱动与连接
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.12" data-path="../Mongodb/mongodb-ObjectId实践.html">
            
                <a href="../Mongodb/mongodb-ObjectId实践.html">
            
                    
                    mongodb ObjectId实践
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.13" data-path="../Mongodb/mongodb角色权限.html">
            
                <a href="../Mongodb/mongodb角色权限.html">
            
                    
                    mongodb角色权限
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../category/java并发.html">
            
                <a href="../category/java并发.html">
            
                    
                    Java并发
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../Java-Base/Java并发.html">
            
                <a href="../Java-Base/Java并发.html">
            
                    
                    Java并发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../Java-Base/Java并发.html">
            
                <a href="../Java-Base/Java并发.html#锁">
            
                    
                    Java并发之锁设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../Java-Base/Java并发.html">
            
                <a href="../Java-Base/Java并发.html#synchronized">
            
                    
                    Java并发之synchronized
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../Java-Base/Java之Lock.html">
            
                <a href="../Java-Base/Java之Lock.html#reentrantlock">
            
                    
                    Java Lock之ReentrantLock
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../Java-Base/Java之Lock.html">
            
                <a href="../Java-Base/Java之Lock.html#reentrantreadwritelock">
            
                    
                    Java Lock之ReentrantReadWriteLock
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../Java-Base/Java之Future.html">
            
                <a href="../Java-Base/Java之Future.html">
            
                    
                    Java Future
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="../Java-Base/Java之Future.html">
            
                <a href="../Java-Base/Java之Future.html#futuretask">
            
                    
                    Java Future之FutureTask
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8" data-path="../Java-Base/Java之Future.html">
            
                <a href="../Java-Base/Java之Future.html#completablefuture">
            
                    
                    Java Future之CompletableFuture
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9" data-path="../Java-Base/Java之Future.html">
            
                <a href="../Java-Base/Java之Future.html#forkjointask">
            
                    
                    Java Future之ForkJoinTask
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.10" data-path="../Java-Base/Java之Thread.html">
            
                <a href="../Java-Base/Java之Thread.html">
            
                    
                    Java Thread
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../category/redis.html">
            
                <a href="../category/redis.html">
            
                    
                    Redis
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html">
            
                    
                    Redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html#集群">
            
                    
                    Redis集群
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html#消息订阅">
            
                    
                    Redis消息订阅
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html#lua">
            
                    
                    Redis Lua脚本
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html#配置汇总">
            
                    
                    Redis配置汇总
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../category/运维.html">
            
                <a href="../category/运维.html">
            
                    
                    运维
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../运维/Linux常用操作汇总.html">
            
                <a href="../运维/Linux常用操作汇总.html">
            
                    
                    Linux常用操作汇总
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../运维/阿里云笔记.html">
            
                <a href="../运维/阿里云笔记.html">
            
                    
                    阿里云笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../category/nginx.html">
            
                <a href="../category/nginx.html">
            
                    
                    Nginx
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../运维/Nginx学习笔记.html">
            
                <a href="../运维/Nginx学习笔记.html">
            
                    
                    Nginx基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../运维/Nginx负载均衡.html">
            
                <a href="../运维/Nginx负载均衡.html">
            
                    
                    Nginx负载均衡
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../运维/Nginx限流.html">
            
                <a href="../运维/Nginx限流.html">
            
                    
                    Nginx限流
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../运维/Nginx学习笔记.html">
            
                <a href="../运维/Nginx学习笔记.html#六、其他">
            
                    
                    Nginx客户端辅助技巧
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../category/容器化.html">
            
                <a href="../category/容器化.html">
            
                    
                    容器化
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../Docker/docker笔记.html">
            
                <a href="../Docker/docker笔记.html">
            
                    
                    Docker学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../Docker/docker笔记.html">
            
                <a href="../Docker/docker笔记.html#基础操作">
            
                    
                    Docker基础操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../Docker/docker笔记.html">
            
                <a href="../Docker/docker笔记.html#dockerfile">
            
                    
                    DockerFile
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../category/Web.html">
            
                <a href="../category/Web.html">
            
                    
                    Web
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../运维/Http入坑Https笔记.html">
            
                <a href="../运维/Http入坑Https笔记.html">
            
                    
                    Http入坑Https笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../Web/阿里云OSS.html">
            
                <a href="../Web/阿里云OSS.html">
            
                    
                    OSS
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../category/java基础.html">
            
                <a href="../category/java基础.html">
            
                    
                    Java基础
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../Java-Base/Java基础.html">
            
                <a href="../Java-Base/Java基础.html#jvm">
            
                    
                    JVM基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../Java-Base/Java基础.html">
            
                <a href="../Java-Base/Java基础.html#语法糖">
            
                    
                    Java语法糖
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" data-path="../Java-Base/Java基础.html">
            
                <a href="../Java-Base/Java基础.html#数据结构">
            
                    
                    Java数据结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" data-path="../Java-Base/Java8函数式编程.html">
            
                <a href="../Java-Base/Java8函数式编程.html">
            
                    
                    java8函数式编程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" data-path="../Java-Base/ArrayList源码分析.html">
            
                <a href="../Java-Base/ArrayList源码分析.html">
            
                    
                    JDK源码分析ArrayList
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.6" data-path="../Java-Base/HashMap源码分析.html">
            
                <a href="../Java-Base/HashMap源码分析.html">
            
                    
                    JDK源码分析HashMap
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.7" data-path="../Java-Base/Java注解.html">
            
                <a href="../Java-Base/Java注解.html">
            
                    
                    Java注解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.8" data-path="../Java-Base/Timsort排序算法.html">
            
                <a href="../Java-Base/Timsort排序算法.html">
            
                    
                    Timsort排序算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.9" data-path="../Java-Base/插入排序分析与Java实现.html">
            
                <a href="../Java-Base/插入排序分析与Java实现.html">
            
                    
                    插入排序分析与Java实现
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../category/工具与规范.html">
            
                <a href="../category/工具与规范.html">
            
                    
                    工具与规范
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../工具/Maven使用技巧汇总.html">
            
                <a href="../工具/Maven使用技巧汇总.html">
            
                    
                    Maven使用技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="../编码规范/Java编码规范.html">
            
                <a href="../编码规范/Java编码规范.html">
            
                    
                    Java编码规范
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../category/OLAP.html">
            
                <a href="../category/OLAP.html">
            
                    
                    OLAP
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="../数据处理/storm学习笔记.html">
            
                <a href="../数据处理/storm学习笔记.html">
            
                    
                    流式计算Storm学习笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../category/数据运营.html">
            
                <a href="../category/数据运营.html">
            
                    
                    数据运营
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../数据运营/增长黑客数据运营.html">
            
                <a href="../数据运营/增长黑客数据运营.html">
            
                    
                    增长黑客-数据运营
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="../category/前端技术栈.html">
            
                <a href="../category/前端技术栈.html">
            
                    
                    前端技术栈
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.14.1" data-path="../前端/JavaScript设计模式.html">
            
                <a href="../前端/JavaScript设计模式.html">
            
                    
                    JavaScript设计模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.2" data-path="../前端/html相对路径与绝对路径.html">
            
                <a href="../前端/html相对路径与绝对路径.html">
            
                    
                    Html相对路径与绝对路径
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.3" data-path="../前端/微信小程序学习笔记.html">
            
                <a href="../前端/微信小程序学习笔记.html">
            
                    
                    微信小程序学习笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="../category/个人.html">
            
                <a href="../category/个人.html">
            
                    
                    个人
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.15.1" data-path="../个人/简历.html">
            
                <a href="../个人/简历.html">
            
                    
                    简历
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >熔断Hystrix</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x7194;&#x65AD;hystrix">&#x7194;&#x65AD;Hystrix</h1>
<p><a href="http://naotu.baidu.com/file/60dae01eeb6d1605b29dad53c767fdb0?token=c48651210d11e075" target="_blank">&#x7194;&#x65AD;Hystrix&#x8111;&#x56FE;</a></p>
<hr>
<h2 id="hystrix&#x6267;&#x884C;&#x903B;&#x8F91;">Hystrix&#x6267;&#x884C;&#x903B;&#x8F91;</h2>
<p><img src="http://static.zybuluo.com/zero1036/wqaxvxrmlu92p80m0d044dp2/608A9B7F-DAE8-4CC4-8046-D5A75F2C23EE.png" alt="608A9B7F-DAE8-4CC4-8046-D5A75F2C23EE.png-200.3kB"></p>
<h2 id="&#x7194;&#x65AD;&#x5668;circuit-breaker">&#x7194;&#x65AD;&#x5668;Circuit Breaker</h2>
<p>&#x7194;&#x65AD;&#x5668;&#x6267;&#x884C;&#x903B;&#x8F91;</p>
<ol>
<li>&#x7194;&#x65AD;&#x5668;&#x662F;&#x5426;&#x5F00;&#x542F;</li>
<li>&#x81F3;&#x5C11;X&#x4E2A;&#x8BF7;&#x6C42;&#x9519;&#x8BEF;&#x624D;&#x8FDB;&#x5165;&#x767E;&#x5206;&#x6BD4;&#x8BA1;&#x7B97;</li>
<li>&#x9519;&#x8BEF;&#x767E;&#x5206;&#x6BD4;&#x8D85;&#x8FC7;&#x5219;&#x5F00;&#x542F;&#x7194;&#x65AD;&#x5668;</li>
<li>&#x5F00;&#x542F;&#x540E;&#xFF0C;&#x7761;&#x7720;&#x65F6;&#x95F4;&#x8D85;&#x8FC7;&#x914D;&#x7F6E;&#x65F6;&#x95F4;&#xFF0C;&#x8FDB;&#x5165;&#x534A;&#x5F00;&#x72B6;&#x6001;&#xFF0C;&#x5141;&#x8BB8;&#x4E00;&#x6761;&#x8BF7;&#x6C42;</li>
</ol>
<p><img src="http://static.zybuluo.com/zero1036/sch71garxh6g7jd3yjglbucs/7BB56A63-7958-4721-891E-287241159EB7.png" alt="7BB56A63-7958-4721-891E-287241159EB7.png-537kB"></p>
<p>&#x7194;&#x65AD;&#x5668;&#x914D;&#x7F6E;&#x9879;&#x6E05;&#x5355;</p>
<pre><code class="lang-java"><span class="hljs-comment">//&#x5F00;&#x542F;&#x7194;&#x65AD;&#x5668;</span>
.withCircuitBreakerEnabled(<span class="hljs-keyword">true</span>)
<span class="hljs-comment">//&#x7194;&#x65AD;&#x5668;&#x5F3A;&#x5236;&#x6253;&#x5F00;</span>
.withCircuitBreakerForceOpen(<span class="hljs-keyword">true</span>)
<span class="hljs-comment">//&#x7194;&#x65AD;&#x5668;&#x5F3A;&#x5236;&#x5173;&#x95ED;</span>
.withCircuitBreakerForceClosed(<span class="hljs-keyword">false</span>)
<span class="hljs-comment">//&#x9ED8;&#x8BA4;&#x503C;20.&#x610F;&#x601D;&#x662F;&#x81F3;&#x5C11;&#x6709;20&#x4E2A;&#x8BF7;&#x6C42;&#x624D;&#x8FDB;&#x884C;errorThresholdPercentage&#x9519;&#x8BEF;&#x767E;&#x5206;&#x6BD4;&#x8BA1;&#x7B97;&#x3002;</span>
<span class="hljs-comment">// &#x6BD4;&#x5982;&#x4E00;&#x6BB5;&#x65F6;&#x95F4;&#xFF08;10s&#xFF09;&#x5185;&#x6709;19&#x4E2A;&#x8BF7;&#x6C42;&#x5168;&#x90E8;&#x5931;&#x8D25;&#x4E86;&#x3002;&#x9519;&#x8BEF;&#x767E;&#x5206;&#x6BD4;&#x662F;100%&#xFF0C;&#x4F46;&#x7194;&#x65AD;&#x5668;&#x4E0D;&#x4F1A;&#x6253;&#x5F00;&#xFF0C;&#x56E0;&#x4E3A;requestVolumeThreshold&#x7684;&#x503C;&#x662F;20.</span>
<span class="hljs-comment">// &#x8FD9;&#x4E2A;&#x53C2;&#x6570;&#x975E;&#x5E38;&#x91CD;&#x8981;&#xFF0C;&#x7194;&#x65AD;&#x5668;&#x662F;&#x5426;&#x6253;&#x5F00;&#x9996;&#x5148;&#x8981;&#x6EE1;&#x8DB3;&#x8FD9;&#x4E2A;&#x6761;&#x4EF6;&#x3002;</span>
<span class="hljs-comment">// &#x53C2;&#x8003;&#x56FE;&#x5B9E;&#x4F8B;&#x3010;1&#x3011;</span>
.withCircuitBreakerRequestVolumeThreshold(<span class="hljs-number">20</span>)
<span class="hljs-comment">//&#x8BBE;&#x5B9A;&#x9519;&#x8BEF;&#x767E;&#x5206;&#x6BD4;&#xFF0C;&#x9ED8;&#x8BA4;&#x503C;50%&#xFF0C;&#x4F8B;&#x5982;&#x4E00;&#x6BB5;&#x65F6;&#x95F4;&#xFF08;10s&#xFF09;&#x5185;&#x6709;100&#x4E2A;&#x8BF7;&#x6C42;&#xFF0C;&#x5176;&#x4E2D;&#x6709;55&#x4E2A;&#x8D85;&#x65F6;&#x6216;&#x8005;&#x5F02;&#x5E38;&#x8FD4;&#x56DE;&#x4E86;&#xFF0C;</span>
<span class="hljs-comment">// &#x90A3;&#x4E48;&#x8FD9;&#x6BB5;&#x65F6;&#x95F4;&#x5185;&#x7684;&#x9519;&#x8BEF;&#x767E;&#x5206;&#x6BD4;&#x662F;55%&#xFF0C;&#x5927;&#x4E8E;&#x4E86;&#x9ED8;&#x8BA4;&#x503C;50%&#xFF0C;&#x8FD9;&#x79CD;&#x60C5;&#x51B5;&#x4E0B;&#x89E6;&#x53D1;&#x7194;&#x65AD;&#x5668;-&#x6253;&#x5F00;&#x3002;</span>
<span class="hljs-comment">// &#x53C2;&#x8003;&#x56FE;&#x5B9E;&#x4F8B;&#x3010;2&#x3011;</span>
.withCircuitBreakerErrorThresholdPercentage(<span class="hljs-number">50</span>)
<span class="hljs-comment">//&#x534A;&#x5F00;&#x8BD5;&#x63A2;&#x4F11;&#x7720;&#x65F6;&#x95F4;&#xFF0C;&#x9ED8;&#x8BA4;&#x503C;5000ms&#x3002;&#x5F53;&#x7194;&#x65AD;&#x5668;&#x5F00;&#x542F;&#x4E00;&#x6BB5;&#x65F6;&#x95F4;&#x4E4B;&#x540E;&#x6BD4;&#x5982;5000ms&#xFF0C;&#x4F1A;&#x5C1D;&#x8BD5;&#x653E;&#x8FC7;&#x53BB;&#x4E00;&#x90E8;&#x5206;&#x6D41;&#x91CF;&#x8FDB;&#x884C;&#x8BD5;&#x63A2;&#xFF0C;&#x786E;&#x5B9A;&#x4F9D;&#x8D56;&#x670D;&#x52A1;&#x662F;&#x5426;&#x6062;&#x590D;&#x3002;</span>
<span class="hljs-comment">//&#x5982;&#x679C;&#x8BD5;&#x63A2;&#x8BF7;&#x6C42;&#x6210;&#x529F;&#xFF0C;&#x7194;&#x65AD;&#x5668;&#x5173;&#x95ED;&#xFF1B;&#x5982;&#x679C;&#x5931;&#x8D25;&#xFF0C;&#x7194;&#x65AD;&#x5668;&#x518D;&#x6B21;&#x6253;&#x5F00;&#xFF0C;&#x7EE7;&#x7EED;&#x7B49;&#x5F85;&#x4E0B;&#x4E00;&#x4E2A;&#x4F11;&#x7720;&#x7A97;&#x53E3;&#x8FC7;&#x53BB;&#x540E;&#x518D;&#x91CD;&#x8BD5;</span>
<span class="hljs-comment">// &#x53C2;&#x8003;&#x56FE;&#x5B9E;&#x4F8B;&#x3010;3&#x3011;</span>
.withCircuitBreakerSleepWindowInMilliseconds(<span class="hljs-number">5000</span>)
</code></pre>
<h2 id="&#x9694;&#x79BB;">&#x9694;&#x79BB;</h2>
<p>&#x53C2;&#x8003;&#x535A;&#x6587;&#xFF1A;<a href="http://www.coolxuewang.com/view/4" target="_blank">http://www.coolxuewang.com/view/4</a></p>
<h3 id="&#x547D;&#x4EE4;&#x3001;&#x5206;&#x7EC4;&#x3001;&#x7EBF;&#x7A0B;&#x6C60;key">&#x547D;&#x4EE4;&#x3001;&#x5206;&#x7EC4;&#x3001;&#x7EBF;&#x7A0B;&#x6C60;Key</h3>
<p><strong>&#x547D;&#x4EE4;commandKey</strong>&#xFF1A;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x547D;&#x4EE4;&#x540D;&#x79F0;&#x6765;&#x6E90;&#x4E8E;&#x7C7B;&#x540D;&#x3002;Hystrix&#x9ED8;&#x8BA4;&#x4EE5;commandKey&#x4F5C;&#x4E3A;&#x4FE1;&#x53F7;&#x91CF;&#x9694;&#x79BB;&#x7684;&#x4F9D;&#x636E;</p>
<p><strong>&#x5206;&#x7EC4;groupKey</strong>&#xFF1A;Hystrix&#x4F7F;&#x7528;&#x547D;&#x4EE4;&#x5206;&#x7EC4;&#x5C06;&#x4E00;&#x8D77;&#x7684;&#x547D;&#x4EE4;&#x8FDB;&#x884C;&#x7BA1;&#x7406;&#xFF0C;&#x6BD4;&#x5982;&#x62A5;&#x544A;&#x3001;&#x8B66;&#x62A5;&#x3001;&#x4EEA;&#x8868;&#x76D8;&#x6216;&#x7EC4;/&#x5E93;&#x3002;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;Hystrix&#x4F7F;&#x7528; <code>HystrixCommandGroupKey</code>&#x6765;&#x5B9A;&#x4E49;&#x547D;&#x4EE4;&#x7EBF;&#x7A0B;&#x6C60;&#xFF0C;&#x9664;&#x975E;&#x5355;&#x72EC;&#x5B9A;&#x4E49;&#x7EBF;&#x7A0B;&#x6C60;&#x3002;</p>
<p>&#x901A;&#x8FC7;&#x8BBE;&#x7F6E;&#x547D;&#x4EE4;&#x7EC4;, Hystrix&#x4F1A;&#x6839;&#x636E;&#x7EC4;&#x6765;&#x7EC4;&#x7EC7;&#x548C;&#x7EDF;&#x8BA1;&#x547D;&#x4EE4;&#x7684;&#x544A;&#x8B66;&#x3001;&#x4EEA;&#x8868;&#x76D8;&#x7B49;&#x4FE1;&#x606F;&#x3002;&#x90A3;&#x4E48;&#x4E3A;&#x4EC0;&#x4E48;&#x4E00;&#x5B9A;&#x8981;&#x8BBE;&#x7F6E;&#x547D;&#x4EE4;&#x7EC4;&#x5462;?&#x56E0;&#x4E3A;&#x9664;&#x4E86;&#x6839;&#x636E;&#x7EC4;&#x80FD;&#x5B9E;&#x73B0;&#x7EDF;&#x8BA1;&#x4E4B;&#x5916;, Hystrix&#x547D;&#x4EE4;&#x9ED8;&#x8BA4;&#x7684;&#x7EBF;&#x7A0B;&#x5212;&#x5206;&#x4E5F;&#x662F;&#x6839;&#x636E;&#x547D;&#x4EE4;&#x5206;&#x7EC4;&#x6765;&#x5B9E;&#x73B0;&#x7684;&#x3002;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;, Hystrix&#x4F1A;&#x8BA9;&#x76F8;&#x540C;&#x7EC4;&#x540D;&#x7684;&#x547D;&#x4EE4;&#x4F7F;&#x7528;&#x540C;&#x4E00;&#x4E2A;&#x7EBF;&#x7A0B;&#x6C60;, &#x6240;&#x4EE5;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x5728;&#x521B;&#x5EFA; Hystrix&#x547D;&#x4EE4;&#x65F6;&#x4E3A;&#x5176;&#x6307;&#x5B9A;&#x547D;&#x4EE4;&#x7EC4;&#x540D;&#x6765;&#x5B9E;&#x73B0;&#x9ED8;&#x8BA4;&#x7684;&#x7EBF;&#x7A0B;&#x6C60;&#x5212;&#x5206;&#x3002;
&#x5982;&#x679C; Hystrix&#x7684;&#x7EBF;&#x7A0B;&#x6C60;&#x5206;&#x914D;&#x4EC5;&#x4EC5;&#x4F9D;&#x9760;&#x547D;&#x4EE4;&#x7EC4;&#x6765;&#x5212;&#x5206;,&#x90A3;&#x4E48;&#x5B83;&#x5C31;&#x663E;&#x5F97;&#x4E0D;&#x591F;&#x7075;&#x6D3B;&#x4E86;,&#x6240;&#x4EE5;Hystrix&#x8FD8;&#x63D0;&#x4F9B;&#x4E86; Hystrixthreadpoolkey&#x6765;&#x5BF9;&#x7EBF;&#x7A0B;&#x6C60;&#x8FDB;&#x884C;&#x8BBE;&#x7F6E;,&#x901A;&#x8FC7;&#x5B83;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x5B9E;&#x73B0;&#x66F4;&#x7EC6;&#x7C92;&#x5EA6;&#x7684;&#x7EBF;&#x7A0B;&#x6C60;&#x5212;&#x5206;&#x3002;</p>
<p><strong>&#x7EBF;&#x7A0B;&#x6C60;threadKey</strong>&#xFF1A;&#x7EBF;&#x7A0B;&#x6C60;key&#xFF0C;&#x5982;&#x679C;&#x5728;&#x6CA1;&#x6709;&#x7279;&#x522B;&#x6307;&#x5B9A;<code>Hystrixthreadpoo1Key</code>&#x7684;&#x60C5;&#x51B5;&#x4E0B;,&#x4F9D;&#x7136;&#x4F1A;&#x4F7F;&#x7528;&#x547D;&#x4EE4;&#x7EC4;&#x7684;&#x65B9;&#x5F0F;&#x6765;&#x5212;&#x5206;&#x7EBF;&#x7A0B;&#x6C60;&#x3002;&#x901A;&#x5E38;&#x60C5;&#x51B5;&#x4E0B;,&#x5C3D;&#x91CF;&#x901A;&#x8FC7;<code>Hystrixthreadpoolkey</code>&#x7684;&#x65B9;&#x5F0F;&#x6765;&#x6307;&#x5B9A;&#x7EBF;&#x7A0B;&#x6C60;&#x7684;&#x5212;&#x5206;,&#x800C;&#x4E0D;&#x662F;&#x901A;&#x8FC7;&#x7EC4;&#x540D;&#x7684;&#x9ED8;&#x8BA4;&#x65B9;&#x5F0F;&#x5B9E;&#x73B0;&#x5212;&#x5206;,&#x56E0;&#x4E3A;&#x591A;&#x4E2A;&#x4E0D;&#x540C;&#x7684;&#x547D;&#x4EE4;&#x53EF;&#x80FD;&#x4ECE;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#x4E0A;&#x6765;&#x770B;&#x5C5E;&#x4E8E;&#x540C;&#x4E00;&#x4E2A;&#x7EC4;,&#x4F46;&#x662F;&#x5F80;&#x5F80;&#x4ECE;&#x5B9E;&#x73B0;&#x672C;&#x8EAB;&#x4E0A;&#x9700;&#x8981;&#x8DDF;&#x5176;&#x4ED6;&#x547D;&#x4EE4;&#x8FDB;&#x884C;&#x9694;&#x79BB;</p>
<h3 id="&#x9694;&#x79BB;&#x7B56;&#x7565;">&#x9694;&#x79BB;&#x7B56;&#x7565;</h3>
<ol>
<li>&#x4FE1;&#x53F7;&#x91CF;</li>
<li>&#x7EBF;&#x7A0B;&#x6C60;</li>
</ol>
<table>
<thead>
<tr>
<th>&#x7B56;&#x7565;</th>
<th style="text-align:center">&#x6709;&#x7EBF;&#x7A0B;&#x5207;&#x6362;</th>
<th style="text-align:center">&#x652F;&#x6301;&#x5F02;&#x6B65;</th>
<th style="text-align:center">&#x652F;&#x6301;&#x8D85;&#x65F6;</th>
<th style="text-align:center">&#x652F;&#x6301;&#x7194;&#x65AD;</th>
<th style="text-align:center">&#x5F00;&#x9500;&#x5927;&#x5C0F;</th>
<th style="text-align:center">&#x652F;&#x6301;&#x9650;&#x6D41;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x4FE1;&#x53F7;&#x91CF;</td>
<td style="text-align:center">&#x5426;</td>
<td style="text-align:center">&#x5426;</td>
<td style="text-align:center">&#x5426;</td>
<td style="text-align:center">&#x662F;</td>
<td style="text-align:center">&#x5C0F;</td>
<td style="text-align:center">&#x662F;</td>
</tr>
<tr>
<td>&#x7EBF;&#x7A0B;&#x6C60;</td>
<td style="text-align:center">&#x662F;</td>
<td style="text-align:center">&#x662F;</td>
<td style="text-align:center">&#x662F;</td>
<td style="text-align:center">&#x662F;</td>
<td style="text-align:center">&#x5927;</td>
<td style="text-align:center">&#x662F;</td>
</tr>
</tbody>
</table>
<blockquote>
<p>&#x4FE1;&#x53F7;&#x91CF;&#xFF1A;</p>
</blockquote>
<p><img src="http://static.zybuluo.com/zero1036/6hkv81rzmphe0jk2jjpivvnq/C6CBC35F-B735-4539-8FAC-225BD6469548.png" alt="C6CBC35F-B735-4539-8FAC-225BD6469548.png-55.8kB"></p>
<blockquote>
<p>&#x7EBF;&#x7A0B;&#x6C60;</p>
</blockquote>
<p> <img src="http://static.zybuluo.com/zero1036/cy9z7movxr0aw9rjtcnpvmpm/F3140775-E348-479E-8C27-143FB7C49760.png" alt="F3140775-E348-479E-8C27-143FB7C49760.png-50.8kB"></p>
<hr>
<h2 id="&#x7F13;&#x5B58;">&#x7F13;&#x5B58;</h2>
<p><strong>&#x91CD;&#x8981;</strong>&#xFF1A;Hystrix&#x7F13;&#x5B58;&#x53EA;&#x80FD;&#x7528;&#x4E8E;&#x540C;&#x4E00;&#x7EBF;&#x7A0B;&#x540C;&#x4E00;&#x8BF7;&#x6C42;&#x7684;&#x4E0A;&#x4E0B;&#xFF0C;&#x4E14;&#x4E0D;&#x540C;&#x7EBF;&#x7A0B;&#x95F4;&#x7F13;&#x5B58;&#x4E0D;&#x5171;&#x4EAB;&#x3002;so&#xFF0C;&#x5176;&#x5B9E;&#x6BD4;&#x8F83;&#x9E21;&#x808B;&#xFF0C;&#x6709;&#x90E8;&#x5206;&#x60C5;&#x51B5;&#x4E0B;&#x53EF;&#x80FD;&#x6709;&#x7528;&#x3002;</p>
<p>&#x5B98;&#x65B9;&#x5EFA;&#x8BAE;&#xFF1A;<code>HystrixRequestContext.initializeContext()</code>&#x521D;&#x59CB;&#x5316;&#x662F;&#x5728;filter&#x4E2D;&#x8FDB;&#x884C;&#xFF0C;&#x4F46;&#x662F;&#x6BCF;&#x4E00;&#x6B21;&#x521D;&#x59CB;&#x5316;&#x4E4B;&#x524D;&#x7684;&#x7F13;&#x5B58;&#x5C31;&#x5931;&#x6548;&#x4E86;&#xFF0C;&#x6240;&#x4EE5;&#x8981;&#x6D4B;&#x7F13;&#x5B58;&#xFF0C;&#x5C31;&#x53EA;&#x80FD;&#x5728;controller&#x4E2D;&#x8C03;&#x7528;&#x4E24;&#x6B21;&#xFF0C;&#x624D;&#x80FD;&#x770B;&#x5230;&#x7F13;&#x5B58;&#x7684;&#x7ED3;&#x679C;&#x662F;&#x5426;&#x76F8;&#x540C;&#xFF0C;&#x5728;&#x540C;&#x4E00;&#x7528;&#x6237;&#x8BF7;&#x6C42;&#x7684;&#x4E0A;&#x4E0B;&#x6587;&#x4E2D;&#xFF0C;&#x76F8;&#x540C;&#x4F9D;&#x8D56;&#x670D;&#x52A1;&#x7684;&#x8FD4;&#x56DE;&#x6570;&#x636E;&#x59CB;&#x7EC8;&#x4FDD;&#x6301;&#x4E00;&#x81F4;&#x3002;</p>
<h3 id="spring&#x4F53;&#x7CFB;&#x4E2D;cacheresult&#x6CE8;&#x89E3;&#x4F7F;&#x7528;">Spring&#x4F53;&#x7CFB;&#x4E2D;<code>@CacheResult</code>&#x6CE8;&#x89E3;&#x4F7F;&#x7528;</h3>
<pre><code class="lang-java"><span class="hljs-meta">@Service</span>
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">CustomerService</span> </span>{

    <span class="hljs-meta">@Autowired</span>
    <span class="hljs-keyword">private</span> RestTemplate restTemplate;


    <span class="hljs-meta">@CacheResult</span>(cacheKeyMethod = <span class="hljs-string">&quot;getKey&quot;</span>)
    <span class="hljs-meta">@HystrixCommand</span>(
            fallbackMethod = <span class="hljs-string">&quot;goFallback&quot;</span>,
            groupKey = <span class="hljs-string">&quot;customerGroup&quot;</span>,
            commandKey = <span class="hljs-string">&quot;getCustomer&quot;</span>)
    <span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">getCustomer</span><span class="hljs-params">(@CacheKey(<span class="hljs-string">&quot;id&quot;</span>)</span> String id) </span>{
        RibbonMessage msg = restTemplate.getForObject(<span class="hljs-string">&quot;http://TG-RIBBON-SERVICE/ribbonAccept?id=&quot;</span> + id, RibbonMessage.class);
        System.out.println(msg);
        <span class="hljs-keyword">return</span> msg.toString();
    }

    <span class="hljs-comment">/**
     * &#x6CE8;&#x610F;&#xFF0C;<span class="hljs-doctag">@CacheRemove</span>&#x5FC5;&#x987B;&#x914D;&#x5408;<span class="hljs-doctag">@HystrixCommand</span>&#x4F7F;&#x7528;&#x624D;&#x6709;&#x6548;&#x679C;
     * <span class="hljs-doctag">@param</span> id
     * <span class="hljs-doctag">@return</span>
     */</span>
    <span class="hljs-meta">@HystrixCommand</span>
    <span class="hljs-meta">@CacheRemove</span>(commandKey = <span class="hljs-string">&quot;getCustomer&quot;</span>, cacheKeyMethod = <span class="hljs-string">&quot;getKey&quot;</span>)
    <span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">clearCache</span><span class="hljs-params">(@CacheKey(<span class="hljs-string">&quot;id&quot;</span>)</span> String id) </span>{
        <span class="hljs-keyword">return</span> id;
    }

    <span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">getKey</span><span class="hljs-params">(String id)</span> </span>{
        <span class="hljs-keyword">return</span> id;
    }

    <span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">goFallback</span><span class="hljs-params">(String id)</span> </span>{
        <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;error:&quot;</span> + id;
    }

}
</code></pre>
<h2 id="spring&#x4F53;&#x7CFB;&#x5E94;&#x7528;">Spring&#x4F53;&#x7CFB;&#x5E94;&#x7528;</h2>
<pre><code class="lang-java"><span class="hljs-meta">@HystrixCommand</span>(
        fallbackMethod = <span class="hljs-string">&quot;goFallback&quot;</span>,
        groupKey = <span class="hljs-string">&quot;customerGroup&quot;</span>,
        commandKey = <span class="hljs-string">&quot;getCustomer&quot;</span>, commandProperties = {
        <span class="hljs-comment">//&#x8D85;&#x65F6;</span>
        <span class="hljs-meta">@HystrixProperty</span>(name = <span class="hljs-string">&quot;execution.isolation.thread.timeoutInMilliseconds&quot;</span>, value = <span class="hljs-string">&quot;200&quot;</span>),
        <span class="hljs-comment">//&#x5F00;&#x542F;&#x8BF7;&#x6C42;&#x7F13;&#x5B58;</span>
        <span class="hljs-meta">@HystrixProperty</span>(name = <span class="hljs-string">&quot;requestCache.enabled&quot;</span>, value = <span class="hljs-string">&quot;true&quot;</span>),
        <span class="hljs-comment">//&#x8BBE;&#x7F6E;&#x7194;&#x65AD;</span>
        <span class="hljs-meta">@HystrixProperty</span>(name = <span class="hljs-string">&quot;circuitBreaker.enabled&quot;</span>, value = <span class="hljs-string">&quot;true&quot;</span>),
        <span class="hljs-comment">//&#x65AD;&#x8DEF;&#x5668;&#x7684;&#x6700;&#x5C0F;&#x8BF7;&#x6C42;&#x6570;</span>
        <span class="hljs-meta">@HystrixProperty</span>(name = <span class="hljs-string">&quot;circuitBreaker.requestVolumeThreshold&quot;</span>, value = <span class="hljs-string">&quot;1&quot;</span>),
        <span class="hljs-comment">//&#x4F11;&#x7720;&#x65F6;&#x95F4;</span>
        <span class="hljs-meta">@HystrixProperty</span>(name = <span class="hljs-string">&quot;circuitBreaker.sleepWindowInMilliseconds&quot;</span>, value = <span class="hljs-string">&quot;200&quot;</span>),
        <span class="hljs-comment">//&#x65AD;&#x8DEF;&#x9891;&#x7387;</span>
        <span class="hljs-meta">@HystrixProperty</span>(name = <span class="hljs-string">&quot;circuitBreaker.errorThresholdPercentage&quot;</span>, value = <span class="hljs-string">&quot;60&quot;</span>)
})
<span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">getCustomer</span><span class="hljs-params">(String id)</span> </span>{}
</code></pre>
<h2 id="hystrixobservablecommand&#x4E0E;hystrixcommand">HystrixObservableCommand&#x4E0E;HystrixCommand</h2>
<p>TODO</p>
<h2 id="&#x5B9A;&#x4E49;&#x670D;&#x52A1;&#x964D;&#x7EA7;">&#x5B9A;&#x4E49;&#x670D;&#x52A1;&#x964D;&#x7EA7;</h2>
<h3 id="feign&#x5BA2;&#x6237;&#x7AEF;&#x964D;&#x7EA7;">Feign&#x5BA2;&#x6237;&#x7AEF;&#x964D;&#x7EA7;</h3>
<p>&#x4E3A;Feign&#x5BA2;&#x6237;&#x7AEF;&#x63A5;&#x53E3;&#x5B9A;&#x4E49;&#x670D;&#x52A1;&#x964D;&#x7EA7;&#x7C7B;</p>
<pre><code class="lang-java"><span class="hljs-meta">@Component</span>
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">HelloServiceFallback</span> <span class="hljs-keyword">implements</span> <span class="hljs-title">HelloService</span> </span>{

    <span class="hljs-meta">@Override</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> GetUserResp <span class="hljs-title">getUser</span><span class="hljs-params">(@RequestBody GetUserReq req)</span> </span>{
        <span class="hljs-keyword">return</span> xx
    }
}
</code></pre>
<h3 id="hystrixcommand&#x6CE8;&#x89E3;&#x964D;&#x7EA7;">@HystrixCommand&#x6CE8;&#x89E3;&#x964D;&#x7EA7;</h3>
<pre><code class="lang-java"><span class="hljs-meta">@HystrixCommand</span>(
        fallbackMethod = <span class="hljs-string">&quot;goFallback&quot;</span>,
       )
})
<span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">getCustomer</span><span class="hljs-params">(String id)</span> </span>{}
</code></pre>
<h3 id="hystrixcommand&#x547D;&#x4EE4;&#x964D;&#x7EA7;">HystrixCommand&#x547D;&#x4EE4;&#x964D;&#x7EA7;</h3>
<hr>
<h2 id="&#x5E38;&#x7528;&#x914D;&#x7F6E;&#x6C47;&#x603B;">&#x5E38;&#x7528;&#x914D;&#x7F6E;&#x6C47;&#x603B;</h2>
<p>&#x901A;&#x8FC7;<code>properties</code>&#x914D;&#x7F6E;</p>
<table>
<thead>
<tr>
<th>&#x914D;&#x7F6E;&#x9879;</th>
<th style="text-align:center">&#x9ED8;&#x8BA4;&#x503C;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>hystrix.threadpool.default.coreSize</td>
<td style="text-align:center">10</td>
<td>&#x7EBF;&#x7A0B;&#x6C60;&#x542F;&#x52A8;&#x65F6;&#x7684;&#x56FA;&#x5B9A;&#x5927;&#x5C0F;&#x503C;&#xFF0C;&#x8FD8;&#x4E0D;&#x662F;&#x901A;&#x5E38;&#x6982;&#x5FF5;&#x4E0A;&#x7684;&#x201C;&#x6700;&#x5927;&#x503C;&#x201D;,&#x5BF9;&#x4E8E;CPU&#x5BC6;&#x96C6;&#x578B;&#x7684;&#x4EFB;&#x52A1;&#xFF0C;&#x901A;&#x5E38;&#x5EFA;&#x8BAE;&#x7684;&#x7EBF;&#x7A0B;&#x6C60;&#x5927;&#x5C0F;&#x7B49;&#x4E8E;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;CPU&#x6838;&#x5FC3;&#x6570;&#x5373;&#x53EF;&#xFF08;&#x4E00;&#x822C;&#x662F;CPU&#x6570;*2&#xFF09;;&#x9488;&#x5BF9;IO&#x5BC6;&#x96C6;&#x578B;&#x7684;&#x4EFB;&#x52A1;&#xFF0C;&#x6BD4;&#x5982;&#x9700;&#x8981;&#x8C03;&#x7528;&#x67D0;&#x4E2A;&#x5916;&#x90E8;&#x7684;http&#x670D;&#x52A1;&#xFF0C;&#x5E76;&#x4E14;&#x6BCF;&#x6B21;&#x8C03;&#x7528;&#x65F6;&#x95F4;&#x6BD4;&#x8F83;&#x957F;&#xFF0C;&#x53EF;&#x4EE5;&#x9002;&#x5F53;&#x8C03;&#x5927;&#x8BE5;&#x6570;&#x503C;&#x7528;&#x66F4;&#x591A;&#x7684;&#x7EBF;&#x7A0B;&#x628A;&#x8FD9;&#x4E9B;&#x7B49;&#x5F85;&#x65F6;&#x95F4;&#x5229;&#x7528;&#x8D77;&#x6765;&#x3002;</td>
</tr>
<tr>
<td>hystrix.threadpool.default.maximumSize</td>
<td style="text-align:center">50</td>
<td>&#x6700;&#x5927;&#x7EBF;&#x7A0B;&#x6570;&#xFF0C;&#x8D85;&#x8FC7;coresize&#x90E8;&#x5206;&#x7684;&#x7EBF;&#x7A0B;&#x5728;&#x7A7A;&#x95F2;&#x4E00;&#x6BB5;&#x65F6;&#x95F4;&#x540E;&#x56DE;&#x56DE;&#x6536;</td>
</tr>
<tr>
<td>hystrix.threadpool.default.allowMaximumSizeToDivergeFromCoreSize</td>
<td style="text-align:center">true</td>
<td>&#x662F;&#x5426;&#x8BA9;hystrix.threadpool.default.maximumsize&#x914D;&#x7F6E;&#x751F;&#x6548;</td>
</tr>
<tr>
<td>hystrix.threadpool.default.maxQueueSize</td>
<td style="text-align:center">2000</td>
<td>&#x7EBF;&#x7A0B;&#x7B49;&#x5F85;&#x961F;&#x5217;&#x5927;&#x5C0F;&#xFF0C;&#x5F53;&#x4EFB;&#x52A1;&#x6570;&#x91CF;&#x8D85;&#x8FC7;&#x914D;&#x7F6E;&#x7684;maximumSize&#x65F6;&#xFF0C;&#x591A;&#x4F59;&#x7684;&#x4EFB;&#x52A1;&#x4F1A;&#x8FDB;&#x884C;&#x7B49;&#x5F85;&#x961F;&#x5217;&#xFF0C;&#x7B49;&#x5F85;&#x6709;&#x7EBF;&#x7A0B;&#x7A7A;&#x95F2;&#x65F6;&#x6267;&#x884C;&#xFF1B;&#x5F53;&#x8BBE;&#x5B9A;&#x7684;&#x503C;&#x4E3A;-1&#x65F6;&#xFF0C;&#x7EBF;&#x7A0B;&#x6570;&#x91CF;&#x8D85;&#x8FC7;maximumSize&#x7684;&#x4EFB;&#x52A1;&#x5C06;&#x4F1A;&#x629B;&#x51FA;&#x5F02;&#x5E38;&#x3002;</td>
</tr>
<tr>
<td>hystrix.threadpool.default.queueSizeRejectionThreshold</td>
<td style="text-align:center">1000</td>
<td>&#x7531;&#x4E8E;&#x7B49;&#x5F85;&#x961F;&#x5217;&#x4E0D;&#x80FD;&#x52A8;&#x6001;&#x4FEE;&#x6539;&#x5927;&#x5C0F;&#xFF0C;&#x6240;&#x4EE5;&#x5F15;&#x8FDB;&#x4E86;queueSizeRejectionThreshold&#x914D;&#x7F6E;&#x6765;&#x8FDB;&#x884C;&#x52A8;&#x6001;&#x53D8;&#x66F4;&#xFF1B;queueSizeRejectionThreshold&#x5E94;&#x5F53;&#x5C0F;&#x4E8E;maxQueueSize&#xFF0C;&#x5F53;&#x9700;&#x8981;&#x7B49;&#x5F85;&#x7684;&#x7EBF;&#x7A0B;&#x603B;&#x6570;&#x5927;&#x4E8E;queueSizeRejectionThreshold&#x65F6;&#xFF0C;&#x5373;&#x4F7F;&#x6CA1;&#x6709;&#x8FBE;&#x5230;maxQueueSize&#xFF0C;&#x4F9D;&#x7136;&#x4F1A;&#x88AB;&#x62D2;&#x7EDD;&#x8FDB;&#x884C;&#x7B49;&#x5F85;&#x961F;&#x5217;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x5728;&#x8FD0;&#x884C;&#x65F6;&#x5BF9;&#x8BE5;&#x914D;&#x7F6E;&#x8FDB;&#x884C;&#x52A8;&#x6001;&#x4FEE;&#x6539;&#x3002;</td>
</tr>
<tr>
<td>hystrix.threadpool.default.keepAliveTimeMinutes</td>
<td style="text-align:center">1</td>
<td>&#x5F53;&#x8D85;&#x51FA;coreSize&#x5927;&#x5C0F;&#x7684;&#x7EBF;&#x7A0B;&#x7A7A;&#x95F2;&#x65F6;&#x95F4;&#x8FBE;&#x5230;&#x8BBE;&#x5B9A;&#x503C;&#x65F6;&#xFF0C;&#x5C06;&#x4F1A;&#x88AB;&#xFF0C;&#x56DE;&#x6536;&#x3002;</td>
</tr>
<tr>
<td>hystrix.command.default.execution.isolation.strategy</td>
<td style="text-align:center">THREAD</td>
<td>hystrix&#x7684;&#x9694;&#x79BB;&#x7B56;&#x7565;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x7EBF;&#x7A0B;&#x6C60;&#x6216;&#x8005;&#x4FE1;&#x53F7;&#x91CF;&#x6A21;&#x5F0F;&#xFF0C;&#x56E0;&#x4E3A;&#x4FE1;&#x53F7;&#x91CF;&#x662F;&#x963B;&#x585E;&#x5F0F;&#x7684;&#xFF0C;&#x63A8;&#x8350;&#x4F7F;&#x7528;&#x7EBF;&#x7A0B;&#x6C60;&#x3002;</td>
</tr>
<tr>
<td>hystrix.command.default.execution.isolation<br>.thread.timeoutInMilliseconds</td>
<td style="text-align:center">1000</td>
<td>hystrix&#x4EFB;&#x52A1;&#x6267;&#x884C;&#x8D85;&#x65F6;&#x65F6;&#x95F4;&#xFF0C;&#x5E94;&#x5F53;&#x5927;&#x4E8E;ribbon&#x8BBE;&#x7F6E;&#x7684;&#x8FDE;&#x63A5;&#x8D85;&#x65F6;&#x65F6;&#x95F4;&#x4E0E;&#x8BFB;&#x8D85;&#x65F6;&#x65F6;&#x95F4;&#x7684;&#x548C;&#xFF0C;&#x4F46;&#x4E0D;&#x5E94;&#x8BE5;&#x592A;&#x5927;&#x3002;</td>
</tr>
<tr>
<td>hystrix.command.default.execution.timeout.enabled</td>
<td style="text-align:center">true</td>
<td>&#x662F;&#x5426;&#x542F;&#x7528;&#x4EFB;&#x52A1;&#x8D85;&#x65F6;&#x8BBE;&#x7F6E;&#xFF0C;&#x63A8;&#x8350;&#x4F7F;&#x7528;&#xFF0C;&#x9632;&#x6B62;&#x4EFB;&#x52A1;&#x4E00;&#x76F4;&#x7B49;&#x5F85;&#xFF0C;&#x65E0;&#x6CD5;&#x91CA;&#x653E;&#x8D44;&#x6E90;&#x3002;</td>
</tr>
<tr>
<td>hystrix.command.default.execution.isolation<br>.thread.interruptOnTimeout</td>
<td style="text-align:center">true</td>
<td>&#x5F53;&#x4EFB;&#x52A1;&#x6267;&#x884C;&#x65F6;&#x95F4;&#x5DF2;&#x7ECF;&#x8D85;&#x8FC7;&#x8BBE;&#x5B9A;&#x7684;&#x8D85;&#x65F6;&#x4E8B;&#x4EF6;&#x65F6;&#xFF0C;&#x662F;&#x5426;&#x4E2D;&#x65AD;&#x6267;&#x884C;&#x8BF7;&#x6C42;&#x7684;&#x7EBF;&#x7A0B;&#x7684;&#x5DE5;&#x4F5C;&#xFF0C;&#x63A8;&#x8350;&#x4F7F;&#x7528;&#x3002;</td>
</tr>
<tr>
<td>hystrix.command.default.execution.isolation<br>.thread.interruptOnCancel</td>
<td style="text-align:center">false</td>
<td>&#x5F53;&#x8BF7;&#x6C42;&#x670D;&#x52A1;&#x7684;&#x4E3B;&#x7EBF;&#x7A0B;&#x88AB;&#x4E2D;&#x65AD;&#x6216;&#x53D6;&#x6D88;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x662F;&#x5426;&#x4E2D;&#x65AD;&#x6267;&#x884C;&#x8BF7;&#x6C42;&#x7684;&#x7EBF;&#x7A0B;&#x7684;&#x5DE5;&#x4F5C;&#x3002;</td>
</tr>
<tr>
<td>hystrix.command.default.fallback.enabled</td>
<td style="text-align:center">true</td>
<td>&#x662F;&#x5426;&#x542F;&#x7528;hystrix fallback&#x529F;&#x80FD;&#x3002;</td>
</tr>
<tr>
<td>hystrix.command.default.fallback.isolation<br>.semaphore.maxConcurrentRequests</td>
<td style="text-align:center">10</td>
<td>&#x5F53;&#x8BF7;&#x6C42;&#x5931;&#x8D25;&#x7684;&#x6570;&#x91CF;&#x8FBE;&#x5230;&#x8BBE;&#x5B9A;&#x7684;&#x8BE5;&#x6570;&#x503C;&#x65F6;&#xFF0C;&#x5C06;&#x4F1A;&#x76F4;&#x63A5;&#x62D2;&#x7EDD;&#x63A5;&#x4E0B;&#x6765;&#x4E00;&#x6BB5;&#x65F6;&#x95F4;&#x5185;&#x7684;&#x6240;&#x6709;&#x8BF7;&#x6C42;&#xFF1B;&#x53EF;&#x6839;&#x636E;&#x670D;&#x52A1;&#x7684;&#x627F;&#x8F7D;&#x91CF;&#x81EA;&#x884C;&#x8BBE;&#x5B9A;</td>
</tr>
<tr>
<td>hystrix.command.default.circuitBreaker.enabled</td>
<td style="text-align:center">true</td>
<td>&#x662F;&#x5426;&#x542F;&#x7528;hystrix&#x65AD;&#x8DEF;&#x5668;&#x529F;&#x80FD;&#x3002;</td>
</tr>
<tr>
<td>hystrix.command.default.circuitBreaker<br>.requestVolumeThreshold</td>
<td style="text-align:center">20</td>
<td>&#x8FDB;&#x884C;hystrix&#x79BB;&#x5408;&#x5668;&#x5224;&#x5B9A;&#x7684;&#x6700;&#x5C0F;&#x8BF7;&#x6C42;&#x6570;&#x91CF;&#xFF0C;&#x5373;&#x53EA;&#x6709;&#x5F53;&#x8BF7;&#x6C42;&#x7684;&#x6570;&#x91CF;&#x8FBE;&#x5230;&#x8BBE;&#x5B9A;&#x7684;&#x503C;&#x65F6;&#xFF0C;&#x624D;&#x4F1A;&#x8FDB;&#x884C;&#x5224;&#x5B9A;&#x662F;&#x5426;&#x5F00;&#x542F;&#x65AD;&#x8DEF;&#x5668;&#x3002;</td>
</tr>
<tr>
<td>hystrix.command.default.circuitBreaker<br>.sleepWindowInMilliseconds</td>
<td style="text-align:center">5000</td>
<td>&#x5F53;&#x65AD;&#x8DEF;&#x5668;&#x5F00;&#x542F;&#x4EE5;&#x540E;&#x65F6;&#x95F4;&#x8FBE;&#x5230;&#x8BBE;&#x5B9A;&#x7684;&#x6570;&#x503C;&#x65F6;&#xFF0C;&#x4F1A;&#x5C1D;&#x8BD5;&#x5173;&#x95ED;&#x65AD;&#x8DEF;&#x5668;&#xFF0C;&#x91CD;&#x65B0;&#x8BF7;&#x6C42;&#x670D;&#x52A1;&#xFF0C;&#x5982;&#x679C;&#x8BF7;&#x6C42;&#x6210;&#x529F;&#xFF0C;&#x65AD;&#x8DEF;&#x5668;&#x5C06;&#x4F1A;&#x4FDD;&#x6301;&#x5173;&#x95ED;&#x72B6;&#x6001;&#xFF1B;&#x5426;&#x5219;&#x4F1A;&#x91CD;&#x65B0;&#x5F00;&#x542F;&#x65AD;&#x8DEF;&#x5668;&#x3002;</td>
</tr>
<tr>
<td>hystrix.command.default.circuitBreaker<br>.errorThresholdPercentage</td>
<td style="text-align:center">50</td>
<td>&#x5F53;&#x8BF7;&#x6C42;&#x7684;&#x5931;&#x8D25;&#x6BD4;&#x4F8B;&#x8FBE;&#x5230;&#x8BBE;&#x5B9A;&#x503C;&#x65F6;&#xFF0C;&#x4F1A;&#x5F00;&#x542F;&#x65AD;&#x8DEF;&#x5668;&#x3002;</td>
</tr>
<tr>
<td>hystrix.command.default.circuitBreaker.forceOpen</td>
<td style="text-align:center">false</td>
<td>&#x662F;&#x5426;&#x5F3A;&#x5236;&#x5F00;&#x542F;&#x65AD;&#x8DEF;&#x5668;&#xFF0C;&#x7F6E;&#x4E3A;true&#x65F6;&#xFF0C;&#x65AD;&#x8DEF;&#x5668;&#x5C06;&#x4E00;&#x76F4;&#x4FDD;&#x6301;&#x5F00;&#x542F;&#x72B6;&#x6001;&#xFF0C;&#x5E76;&#x62D2;&#x7EDD;&#x6240;&#x6709;&#x670D;&#x52A1;&#x3002;</td>
</tr>
<tr>
<td>hystrix.command.default.circuitBreaker.forceClosed</td>
<td style="text-align:center">false</td>
<td>&#x662F;&#x5426;&#x5F3A;&#x5236;&#x5173;&#x95ED;&#x65AD;&#x8DEF;&#x5668;&#xFF0C;&#x7F6E;&#x4E3A;true&#x65F6;&#xFF0C;&#x65AD;&#x8DEF;&#x5668;&#x5C06;&#x4E00;&#x76F4;&#x4FDD;&#x6301;&#x5173;&#x95ED;&#x72B6;&#x6001;&#xFF0C;&#x4E0D;&#x7BA1;&#x8BF7;&#x6C42;&#x7684;&#x5931;&#x8D25;&#x6BD4;&#x4F8B;&#x6709;&#x591A;&#x5927;&#x3002;</td>
</tr>
<tr>
<td>hystrix.collapser.default.requestCache.enabled</td>
<td style="text-align:center">true</td>
<td>&#x5728;&#x6279;&#x5904;&#x7406;&#x8BF7;&#x6C42;&#x4E2D;&#x662F;&#x5426;&#x542F;&#x7528;&#x7F13;&#x5B58;&#x3002;</td>
</tr>
<tr>
<td>hystrix.collapser.default.maxRequestsInBatch</td>
<td style="text-align:center">Integer.MAX_VALUE</td>
<td>&#x5F53;&#x6279;&#x5904;&#x7406;&#x8BF7;&#x6C42;&#x4E2D;&#x7684;&#x8BF7;&#x6C42;&#x603B;&#x6570;&#x8FBE;&#x5230;&#x8BBE;&#x7F6E;&#x7684;&#x503C;&#x65F6;&#x4F1A;&#x89E6;&#x53D1;&#x6279;&#x5904;&#x7406;&#x8BF7;&#x6C42;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x65E0;&#x9650;&#x5927;&#xFF0C;&#x901A;&#x8FC7;&#x4E0B;&#x9762;&#x7684;&#x914D;&#x7F6E;&#x89E6;&#x53D1;&#x8BF7;&#x6C42;</td>
</tr>
<tr>
<td>hystrix.collapser.default.timerDelayInMilliseconds</td>
<td style="text-align:center">10</td>
<td>&#x5F53;&#x6279;&#x5904;&#x7406;&#x8BF7;&#x6C42;&#x88AB;&#x521B;&#x5EFA;&#x8BE5;&#x65F6;&#x95F4;&#x503C;&#x4EE5;&#x540E;&#xFF0C;&#x4F1A;&#x89E6;&#x53D1;&#x6267;&#x884C;&#x3002;</td>
</tr>
</tbody>
</table>
<p>&#x76D1;&#x63A7;
<a href="https://hot66hot.iteye.com/blog/2155036" target="_blank">https://hot66hot.iteye.com/blog/2155036</a></p>
<p>&#x9694;&#x79BB;&#x7B56;&#x7565;&#x6700;&#x597D;&#x7684;&#x89E3;&#x91CA;
<a href="https://blog.csdn.net/heyutao007/article/details/51006694" target="_blank">https://blog.csdn.net/heyutao007/article/details/51006694</a></p>
<p>spring @CacheResult&#x7F13;&#x5B58;&#x793A;&#x4F8B;&#xFF1A;
<a href="https://www.cnblogs.com/wanggangblog/p/8550218.html" target="_blank">https://www.cnblogs.com/wanggangblog/p/8550218.html</a></p>
<p>&#x6709;&#x63D0;&#x53CA;&#x7F13;&#x5B58;&#x7684;&#x7B56;&#x7565;&#xFF0C;&#x4F46;&#x672A;&#x786E;&#x5B9A;&#x6B63;&#x786E;&#x6027;
<a href="http://www.cnblogs.com/hellxz/p/9056806.html" target="_blank">http://www.cnblogs.com/hellxz/p/9056806.html</a></p>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; tgor.top 2019 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2020-04-23 15:32:53
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../运维/Nginx负载均衡.html" class="navigation navigation-prev " aria-label="Previous page: 负载均衡Nginx">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="缓存.html" class="navigation navigation-next " aria-label="Next page: 缓存">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"熔断Hystrix","level":"1.2.6","depth":2,"next":{"title":"缓存","level":"1.2.7","depth":2,"path":"Java-其他库/缓存.md","ref":"Java-其他库/缓存.md","articles":[]},"previous":{"title":"负载均衡Nginx","level":"1.2.5","depth":2,"path":"运维/Nginx负载均衡.md","ref":"运维/Nginx负载均衡.md","articles":[]},"dir":"ltr"},"config":{"plugins":["chapter-fold","splitter","tbfed-pagefooter","page-toc-button","-search","search-pro","popup","back-to-top-button","code","copy-code-button"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy tgor.top 2019","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"splitter":{},"search-pro":{"cutWordLib":"nodejieba","defineWord":["Gitbook Use"]},"popup":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":true},"fontsettings":{"theme":"sepia","family":"serif","size":1},"highlight":{},"page-toc-button":{"maxTocDepth":2,"minTocSize":2},"back-to-top-button":{},"copy-code-button":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"tgor","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"tgor note","gitbook":"*","description":"tgor生活工作记录"},"file":{"path":"Java-其他库/熔断Hystrix.md","mtime":"2020-04-23T07:32:53.352Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-04-29T08:43:24.127Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-page-toc-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

